﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.CodeDom.Compiler;

namespace RobotBattle2.Scripting {
	public sealed class VariableDeclarationStatement : Statement {
		public Collection<VariableDeclaration> Variables { get { return m_Variables; } }
		private Collection<VariableDeclaration> m_Variables = new Collection<VariableDeclaration>();

		public override void Dump(IndentedTextWriter writer) {
			foreach (var item in Variables) {
				writer.Write("var ");
				item.Dump(writer);
				writer.WriteLine(";");
			}
		}

		public override StatementType Type { get { return StatementType.VariableDeclaration; } }
	}
}
